package com.ladlee.session.impl;

import com.ladlee.session.AbstractSessionManagerStrategy;
import org.springframework.security.web.session.InvalidSessionStrategy;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Auther: dingchang
 * @Date: 2018/12/25 12:55
 * @Description:
 */
public class LadLeeInvalidSessionStrategy extends AbstractSessionManagerStrategy implements InvalidSessionStrategy {

    public LadLeeInvalidSessionStrategy(String sessionDestinationUrl) {
        super(sessionDestinationUrl);
    }

    @Override
    public void onInvalidSessionDetected(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
        onSessionInvalid(httpServletRequest,httpServletResponse);
    }
}
